package com.cenwangkeji.zhihuimuye.ui.adapter;

import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;


import com.cenwangkeji.zhihuimuye.R;
import com.cenwangkeji.zhihuimuye.model.bean.CowBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;


import java.util.List;

/**
 * @松 on 2019/7/18 09:50
 *
 */
public class MainAdapter extends BaseQuickAdapter<CowBean,BaseViewHolder> {
    public MainAdapter(@Nullable List<CowBean> data) {
        super(R.layout.item_main_cow, data);
    }

    @Override
    protected void convert(BaseViewHolder helper,CowBean item) {
        helper.setText(R.id.tv_id, "牛只id:  "+item.getId());
        helper.addOnClickListener(R.id.tv_detail).addOnClickListener(R.id.iv)
        .addOnClickListener(R.id.tv_id);


    }
}
